# -*- coding:utf-8 -*-
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *

class BasicConsolePanel(QFrame):
    picPath = "./com/mat/rpa/views/workWindow/images/"
    def __init__(self, parent=None):
        super(BasicConsolePanel, self).__init__(parent)
        #设置布局
        self.entireLayout = QVBoxLayout()
        self.setLayout(self.entireLayout)
        self.entireLayout.setContentsMargins(0,0,0,0)
        self.entireLayout.setSpacing(0)
        #创建顶部面板
        self.topPanel = QWidget()
        self.entireLayout.addWidget(self.topPanel)
        self.topPanelLayout = QHBoxLayout()
        self.topPanel.setLayout(self.topPanelLayout)
        self.topPanelLayout.setContentsMargins(0,0,0,0)
        self.topPanelLayout.setSpacing(0)
        ##安装提示label
        self.hintLabel = QLabel()
        self.hintLabel.setText("默认信息")
        self.topPanelLayout.addWidget(self.hintLabel)
        ##安装弹簧
        self.topPanelLayout.addStretch(1)
        ##安装收起按钮
        self.folddingBtn = QPushButton()
        self.folddingBtn.clicked.connect(self.handlefolddingBtnClicked)
        self.foldded=True #起始不显示信息面板
        self.folddingBtn.setIcon(QIcon(QPixmap(BasicConsolePanel.picPath+"folddown.png")))#起始不显示面板，因此箭头应该朝上
        self.topPanelLayout.addWidget(self.folddingBtn)
        #添加表格
        self.infoTable = QTableWidget()
        self.entireLayout.addWidget(self.infoTable)

    def handlefolddingBtnClicked(self):
        pass